<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>百朋后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/form_table.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/role/role_add.css">
    <link rel="stylesheet" href="__PUBLIC__/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery_validate/css/validationEngine.jquery.css" >
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript" src="__PUBLIC__/ztree/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="__PUBLIC__/ztree/js/jquery.ztree.excheck.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/jquery_validate/js/jquery.validationEngine.js"></script>
    <SCRIPT type="text/javascript">
        <!--
        var setting = {
            check: {
                enable: true,
                chkboxType : {"Y": "p", "N": "s"}
            },
            data: {
                simpleData: {
                    enable: true,
                    pIdKey:"pid"
                }
            }
        };

        var zNodes = $.parseJSON('{$authority_json}');

        $(document).ready(function(){
            $.fn.zTree.init($("#un_authority"), setting, zNodes);
            var zTree = $.fn.zTree.getZTreeObj("un_authority");
            zTree.expandAll(true);

        });
        //-->
    </SCRIPT>
    <script type="text/javascript" src="__PUBLIC__/js/admin/role/role_add.js"></script>
</head>
<body>
<div class="easyui-panel" title="角色新增" style="width:100%;margin-left: auto;border: 0px">
    <div class="form-panel">
        <div  id="form-link">
            <div class="easyui-panel" style="padding:5px;border-width: 0px;border-bottom-width: 1px;">
                <a href="javscript:;" class="easyui-linkbutton" onclick="add_ajax_submit();" iconCls="icon-save" plain="true" style="width:80px">保存</a>
                <a href="javscript:;" class="easyui-linkbutton" onclick="reset();" iconCls="icon-reload" plain="true" style="width:80px">重置</a>
                <a href="javscript:;" class="easyui-linkbutton" onclick="close_tab();" iconCls="icon-undo" plain="true" style="width:80px">关闭</a>
            </div>
        </div>
        <div class="table_main">
            <form id="defaultForm" method="post" action="../../Admin/user/user_add_ajax">
                <div class="left">
                    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                        <tr>
                            <th width="131">名称</th>
                            <th>内容</th>
                            <th>权限设置</th>
                        </tr>
                        <tr>
                            <td align="right">角色名称</td>
                            <td width="30%">
                                <input type="text" name="role_name" id="role_name" value="" class="inpMain validate[required]" placeholder="请填写角色名称"/>
                            </td>
                            <td rowspan="2"><ul id="un_authority" class="ztree"></ul></td>
                        </tr>
                        <tr>
                            <td align="right">角色编号</td>
                            <td width="30%">
                                <input type="text" name="role_code" id="role_code" value="" class="inpMain validate[required,custom[number],minSize[8],maxSize[8],ajax[ajaxRoleCode]]" placeholder="请填写登录名"/>
                            </td>
                        </tr>
                    </table>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="__PUBLIC__/js/jquery_validate/js/jquery.validationEngine-zh_CN.js"></script>
</html>